<?php
/**
 * 系統名稱: Kacino 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
set_time_limit(0);
declare(ticks = 1);
$arrWeb = array();
//$arrWeb[0] = "fon.uswin.us";	//永豐
$arrWeb[0] = "union77.us";	 //萬寶

$strLog = "/var/log/cronjob/lotto.compareDB.log";
foreach($arrWeb as $strWeb){
	$pcid = pcntl_fork();
	if ($pcid == -1) {
		die("Could not fork!");
	}elseif ($pcid) {	//if ($pcid == -1)//
		print "There are $strWeb kids to terminate.".date("Y-m-d H:i:s")."\n";
	}else{	//if ($pcid == -1)//
		if (!posix_setsid()) { die ("Could not detach"); }; // detach
		print "I am child number ".$strWeb."Time: ".date("Y-m-d H:i:s")."\n";
		print exec("php -c / -f /home/share/www/luckyball.cc/secure/crontab/compareMSDB2.php ".$strWeb." >> ".$strLog." &");
		exit();
	} //if ($pcid == -1)//
} //foreach($arrWeb as $strWeb)//
?>